<include file="Public/header" />


<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
  wx.config({
    debug: false,
    appId: "{$signPackage.appId}",
    timestamp: "{$signPackage.timestamp}",
    nonceStr: "{$signPackage.nonceStr}",
    signature: "{$signPackage.signature}",
    
    jsApiList: [
      'onMenuShareTimeline',
      'onMenuShareAppMessage'
    ]
  });
  
  var setupWeixinShare = function (message) {
    wx.onMenuShareTimeline(message);
    wx.onMenuShareAppMessage(message);
  };
  
  wx.ready(function () {
    // 在这里调用 API
    setupWeixinShare({
        title: "{$shareInfo.title}", // 分享标题
        link: encodeURI("{$shareInfo.link}"), // 分享链接
        imgUrl: encodeURI("{$shareInfo.imgUrl}"), // 分享图标
        desc: "{$shareInfo.desc}", // 分享说明
        type: '', // 分享类型,music、video或link，不填默认为link
        dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        success: function () { 
            // 用户确认分享后执行的回调函数
        },
        cancel: function () { 
            // 用户取消分享后执行的回调函数
        }
    
    });
  });
</script>

<div class="bd" id="request">
	<div class="box">
		<div class="weui_cells_title"><b>提交服务需求</b></div>
		<div class="weui_cell way-1">
			<div class="weui_cell_hd way-name">联系我们</div>
		</div>
		<div class="weui_cell" style="display:block;">
			<div class="weui_cell_bd contact">
				<table border="0">
                    <div>
					<tr>
						<td><img src="/Public/Wechat/images/contact-email.jpg"></td>
						<td>market@goomtu.com</td>
					</tr>
					<tr>
						<td><img src="/Public/Wechat/images/contact-phone.jpg"></td>
						<td><a href="tel:18620359751">18620359751</a>, <a href="tel:0755-82784565">0755-82784565</a></td>
					</tr>
                    <!--
                    <tr>
						<td><img src="/Public/Wechat/images/contact-address.jpg"></td>
						<td>地址：深圳市福田区彩田路福景大厦中座1705</td>
					</tr>
                    -->
                    </div>
				</table>
			</div>
		</div>
		<div class="line"></div>
		<div class="weui_cells weui_cells_form way-2">
			<div class="way-name">提交服务需求</div>
			<form method="post" action="{:U('Expert/request')}" id="request-form">
			<div class="weui_cell">
				<div class="weui_cell_hd"><label class="weui_label">联系人</label></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input type="text" name="contact_name" class="weui_input" placeholder="必填项" id="contact_name">
				</div>
			</div>
			<div class="weui_cell">
				<div class="weui_cell_hd"><label class="weui_label">联系电话</label></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input type="text" name="contact_number" class="weui_input" placeholder="必填项" id="contact_number">
				</div>
			</div>
			<div class="weui_cell">
				<div class="weui_cell_hd"><label class="weui_label">公司名称</label></div>
				<div class="weui_cell_bd weui_cell_primary">
					<input type="text" name="company_name" class="weui_input" id="company_name">
				</div>
			</div>
			<div class="weui_cell">
				<div class="weui_cell_hd"><label class="weui_label label_textarea">需求描述</label></div>
			</div>
			<div class="weui_cell edit-detail" style="padding-top:0">
				<div class="weui_cell_bd cell_textarea">
					<textarea rows="6" name="detail" class="weui_textarea" placeholder="请简要填写需求背景、需求范围和服务目标等"></textarea>
				</div>
			</div>
            <div class="weui_cell" id="submit-info">
				<input type="button" value="提交" class="weui_btn btn-main" id="submit-btn">
			</div>
			</form>
			<script>
			$(function(){
				$("#submit-btn").on("click",function(){
					if($("#contact_name").val() == ''){
						alert('联系人不能为空');
						return;
					}
					if($("#contact_number").val() == ''){
						alert('联系电话不能为空');
						return;
					}
					
					$("#request-form").submit();
				});
			});
			</script>
		</div>
	</div>
</div>
<include file="Public/footer" />